default: all

all: lib

CC:=g++ 
CFLAGS:= $(CPPFLAGS)
AR:=ar
ARFLAGS:= cru
LIBNAME:= libmembership.a
RANLIB:=ranlib
INCS:= -I.
LIBDIRS:= -L.
LIBS:= -lbyz
LIBBYZ:= libbyz.a

CPPFLAGS:= $(INCS) -g -Wall -O3 -pedantic #-pg
#CPPFLAGS:= $(INCS) -g -Wall -pedantic

C_FILES= \
Membership.cc		Principal.cc		Properties.cc\
PropertiesFailure.cc

H_FILES := $(C_FILES:%.cc=%.hpp) ClientMessage.hpp RequestCore.hpp ../constants.hpp 

%.o:: %.cc
	$(CC) $(CPPFLAGS) -o $@ -c $<

OBJ_FILES:=$(C_FILES:%.cc=%.o) 
#$(c_FILES:%.c=%.o)

objs: $(OBJ_FILES)

lib: $(LIBNAME)

$(LIBNAME): objs
	$(AR) $(ARFLAGS) $(LIBNAME) $(OBJ_FILES)

clean:
	-rm -f *.o
	-rm -f *~ 
	-rm -f *.a

